import { LoadChildren } from '@angular/router';
import { FormComponent } from './form.component';
import { FormDesignComponent } from './design/fb-design.component';
import { FormAuthorityComponent } from './authority/fb-authority.component';
import { FormRepositoryComponent } from './repository/fb-repository.component';
import { FormRepositoryDetailComponent } from './repository/fb-repository-detail.component'
import {AuthorityGuard} from "../common/interceptor/authority.guard";

export const formRoutes = [
	{
		path:'',
        canActivate: [AuthorityGuard],
		component: FormComponent,
	    children: [
	    	{ path: '',redirectTo:'design',pathMatch:'full' },
			/**  表单拖拽 **/
			{ path: 'design',  component: FormDesignComponent },
			/**  表单预览打印  **/
			{ path: 'authority',  component: FormAuthorityComponent },
			/**  表单仓库  **/
			{ path: 'repository',  component: FormRepositoryComponent },
			/** 表单详情 */
			{ path: 'repodetail', component: FormRepositoryDetailComponent}
	    ]
	}
];
